//
// Created by Administrator on 2021/11/4.
// May Saint Diana bless you!
//
#include <iostream>


using namespace std;

class Solution {
public:
    bool isPerfectSquare(int num) {
        // 找到平方根
        int left = 0, right = num;
        while (left <= right) {
            int mid = (right - left) / 2 + left;
            long square = (long) mid * mid;
            if (square < num) {
                left = mid + 1;
            } else if (square > num) {
                right = mid - 1;
            } else {
                return true;
            }
        }
        return false;
    }
};

int main() {
    Solution solution;
    int num;
    while (cin>>num) {
        cout << solution.isPerfectSquare(num) << endl;
    }
//    cout << solution.isPerfectSquare(16) << endl;
//    cout << solution.isPerfectSquare(25) << endl;
    return 0;
}
